package facetest;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

public class TestLo {
    public static void main(String[] args) {
        ReentrantLock reentrantLock = new ReentrantLock();
        Condition condition = reentrantLock.newCondition();
        new Thread(() -> {
            reentrantLock.lock();
            System.out.println("thread1~~");
//            try {
//                condition.await();
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }

        }).start();
        new Thread(() -> {
            reentrantLock.lock();
            System.out.println("thread2");
        }).start();
        while (true) ;
    }
}
